<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>部门管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="easyui/themes/default/easyui.css"
	type="text/css"></link>
	<link rel="stylesheet" href="easyui/themes/icon.css" type="text/css"></link>
	<script type="text/javascript" src="easyui/jquery.min.js"></script>
	<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript">
		$(function() {
			$('#dg').datagrid({    
		    url:'findPageAll_Dep.action',
		    width:580,    
		    singleSelect:true,
		    pagination:true,
		    pageList:[5,10,15,20],
		    pageSize:5,
		    columns:[[    
		        {field:'depid',title:'编号',width:100,align:'center'},    
		        {field:'depname',title:'部门',width:100,align:'center'},    
		        {field:'enums',title:'人数',width:100,align:'center'},
		        {field:'uname',title:'负责人',width:100,align:'center'},
		        {field:'opt',title:'操作',align:'center',
		        		formatter: function(value,row,index) {
		        			return '<button id="button" name="button" value="删除" onclick="doDel('+ row.sid +')">删除</button><button id="button" name="button" value="更新" onclick="findById('+ row.sid +')">更新</button>';
		        		}
		        },    
		    ]]    
			}); 
		});	
		
	</script>
  </head>
  
  <body>
    <p align="center">部门列表</p>
    <hr/>
    <div align="center">
	    <table id="dg">
	    	
	    </table>
    </div>
    
    
    <hr/>
  </body>
</html>
